<?php
	// No direct access to this file
	defined('_JEXEC') or die('Restricted access');
?>
<?php
	$url = $this->baseurl.'/images/com_retailshop/';	
?>
<?php 	
	$caregory = '';
	for($i = 0 ; $i < count($this->catagorys_Menu); $i++){
		if($i!=3)
			$caregory .= '<li><a href="index.php?option=com_retailshop&view=home&task=detailscatelog&id='.$this->catagorys_Menu[$i]->id.'">'.$this->catagorys_Menu[$i]->name.'</a></li>';
		else{
			$caregory .= '<li class="last"><a href="index.php?option=com_retailshop&view=home&task=detailscatelog&id='.$this->catagorys_Menu[$i]->id.'">'.$this->catagorys_Menu[$i]->name.'</a></li>';
			break;
		}
	}
?>
<div id="main">
    	<div class="wrapper wmain">
        	<div id="main-premium">
                <div id="default-city">				
					<div id="list-shop">
						<h4>List Shop</h4>
						<div class="area">
							<?php if(count($this->shops)>0){ ?>
							<?php foreach($this->shops as $s) {
								$img_logo = strlen($s->logo) > 4 ? $url.'logo/'.$s->logo: $url.'noimages.jpg' ;
							?>
							<div class="shop">
								<a href="index.php?option=com_retailshop&view=myshop&shop_id=<?php echo $s->id; ?>"><span class="shop-photo"><img src="<?php echo $img_logo; ?>" width="70" height="70" /></span></a>
								<div class="shop-info">
									<div class="shop-head">
										<a href="index.php?option=com_retailshop&view=myshop&shop_id=<?php echo $s->id; ?>"><span><?php echo $s->name; ?></span></a>
									</div>
									<div class="shop-add">
										<span><?php echo $s->address; ?></span>
									</div>
									<div class="shop-short-des">
										
									</div>
								</div>
							</div>
							<?php } } else{  ?>						
							<div class="no-item"><p class="no-product">NO SHOP</p></div>
							<?php } ?>
				</div>			
			  </div>
			</div>
			</div>
            
          <div id="main-search">
             <?php echo $this->loadTemplate('left');?>	
		</div>
        
       </div>
    </div>	
     <script type="text/javascript">
    $(window).load(function() {
		$('#sub-nav ul').html('<?php echo $caregory; ?>');
    });
    </script>